package qijin

// Response 启进接口格式
type Response struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

func (this *Response) Ok() bool {
	return this.Code == "SUCCESS"
}

func (this *Response) Error() string {
	return this.Msg
}

func (this *Response) Err() error {
	if !this.Ok() {
		return this
	}
	return nil
}
